﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="ThanhCongJSC.Helper"%>
<%@ Import Namespace="ThanhCongJSC.Models"%>

<% List<ThanhCongJSC.Models.Content> top3Content = new List<ThanhCongJSC.Models.Content>();
   List<ThanhCongJSC.Models.Content> oldContent = new List<ThanhCongJSC.Models.Content>();
   using (DBThangCongJSCEntities entity = new DBThangCongJSCEntities())
   {
       ContentRepository contentRepository = new ContentRepository(entity);
       var model = contentRepository.GetTop10News(0, "");
       top3Content = model.Take(3).ToList<ThanhCongJSC.Models.Content>();
       oldContent = model.OrderByDescending(b => b.ContentID).Skip(3).Take(7).ToList<ThanhCongJSC.Models.Content>();
   } %>


<div class="module">
    <div class="ztbr">
	    <div class="ztbl">
		<div class="zttr png"> 
			<div class="zttl png">
			    <script type="text/javascript">var startJVTabs91 = function() { var jvTabLago291 = new JVTabLago2({ container: 'jv_tablago291', height: 0, duration: 1000, eventType: 'click', effectType: 'scroll_lr' }); }; window.addEvent('domready', startJVTabs91); </script> 
				<div style="width: 100%;" class="jv_tab_lago2_wrap"> 
					<div class="jv_tab_container"> 
						<div id="jv_tablago291" class="jv_tablago2">
							<div class="jv_tabs_cl">
								<div class="jv_tabs_cr">
									<div class="jv_tabs_bc">
										<div class="jv_tabs_tc">
											<div class="jv_tabs_br">
												<div class="jv_tabs_bl">
													<div class="jv_tabs_tr">
														<div class="jv_tabs_tl">
															<div style="height: 30px;" class="lago2_title">
																<UL class="tabs_title">
																	<LI class="first active" title="Our Stories">
																		<H3><SPAN>Tin Tức Mới</SPAN></H3>
																	</LI> 
																	<LI class="last" title="News and Events">
																		<H3><SPAN>Tin Tức Cũ</SPAN></H3>
																	</LI>
																</UL>
															</div>
															<div class="jv_tabs_panel">
																<div style="left: 0px; top: 0px; display: none; position: absolute;" class="jv_lago2_content">
																	<div class="lago2_content_wrap"> 
                                                                       <%foreach(var item in top3Content){ %>
                                                                           <div class="ztlistitem">
                                                                                <img src="<%= Url.Content(Constant.PathImageTinTuc + item.ContentImage ?? string.Empty) %>" 
                                                                                    alt="" width="120px" height="80px" class="caption" border="0"/>
																			    <a class="ztlisttitle" title="" href='<%= Url.Action("Index", new { queryString = item.ContentCode }) %>'>
                                                                                    <%= item.ContentTitle%>
                                                                                </a>
																			    <p class="ztlistdes"><%= item.ContentTitle%></p>
																	       </div> 
                                                                       <%} %>
																		
	<%--																	<div class="ztlistitem">
																			<img class="caption" border="0" alt="" src="<%= Application["Root"]%>/Content/images/content5.jpg"/> 
																			<A class="ztlisttitle" title="" href="#">Tin Tức Mới</A> 
																			<P class="ztlistdes"> Tin Tức Mới</P>
																		</div> 
																		<div class="ztlistitem">
																			<img class="caption" border="0" alt="" src="<%= Application["Root"]%>/Content/images/content6.jpg"/> 
																			<A class="ztlisttitle" title="" href="#">Tin Tức Mới</A> 
																			<P class="ztlistdes">Tin Tức Mới</P> 
																		</div>--%>
																	</div>
															    </div>
																<div style="left: 0px; top: 0px; display: none; position: absolute;" class="jv_lago2_content">
																	<div class="lago2_content_wrap">
																		<UL class="latestnews">
                                                                         <%foreach (var item in oldContent)
                                                                           { %>
                                                                            <li class="latestnews">
                                                                                <a class="latestnews" href='<%= Url.Action("Index", new { queryString = item.ContentCode }) %>'>
                                                                                    <%= item.ContentTitle%>
                                                                                </a> 
                                                                            </li>
                                                                         <%} %>
<%--																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>
																			<LI class="latestnews"><A class="latestnews" href="#">Tin Tức Cũ</A> </LI>--%>
																		</UL>
																	</div> 
														        </div>
															 </div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div> 
				</div>   									        
			</div>
		</div>
        </div>  
	</div>
</div>